package AppConfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type AppConfig struct {
	Mysql  Mysql
	Redis  Redis
	UpLand UpLand
}
type Mysql struct {
	User     string
	Password string
	Host     string
	Port     string
	Database string
}
type Redis struct {
	Password string
	Host     string
	Port     string
}
type UpLand struct {
	AK     string
	SK     string
	Bucket string
}

var AppConf AppConfig

func ConfInit() {
	viper.SetConfigFile("../AppConfig/conf.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConf)
	fmt.Println(AppConf)
}
